<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>会员开通信息</title>
<link rel="stylesheet" type="text/css" href="/style/css/base.css"/>
<link rel="stylesheet" type="text/css" href="/style/css/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="/style/css/xshop.css?ver=20170916" />
<link rel="stylesheet" type="text/css" href="/style/css/fu.shop.css"/>
<script src="/style/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/style/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/style/js/xShop.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/style/js/sweet-alert.min.js"></script>
<link type="text/css" rel="stylesheet" href="/style/css/sweet-alert.css">
<link href="/style/css/dropload.css" rel="stylesheet">
<script src="/style/js/dropload.js"></script>
<style>
.outer{position:absolute;left:0;width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;-webkit-box-orient:vertical;box-orient:vertical;-webkit-flex-direction:column;flex-direction:column}
.inner{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;background-color:#f1f1f1;overflow-y:scroll;-webkit-overflow-scrolling:touch; margin-bottom: 1.2rem;}
.inner.iPhoneX
{
    margin-bottom: 1.6rem;
}
.opacity{-webkit-animation:opacity .3s linear;animation:opacity .3s linear}
@-webkit-keyframes opacity{0%{opacity:0}
100%{opacity:1}
}
@keyframes opacity{0%{opacity:0}
100%{opacity:1}
}
.popmask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.8);left:0;top:0;z-index:999;display: none;}
.popexp{position:fixed;width:80%;height:70%;padding:10% 5%;left:5%;top:5%;background:#fff;z-index:1000;overflow-x:hidden;overflow-y:auto;display: none;}
.popexp .name{float:left;width:100%;height:auto;color:#999;padding-bottom:.3rem;line-height:.4rem;font-size:.26rem;border-bottom:1px solid #ccc;margin-bottom:.5rem}
.popexp ul{float:left;width:100%;height:auto;list-style:none}
.popexp ul li{border-left:1px solid #ccc;height:auto;background:#fff;color:#999;float:left;width:80%;padding-left:.5rem;font-size:.26rem}
.popexp ul li div{position:absolute;width:.2rem;height:.2rem;border-radius:.2rem;background:#ccc;left:.28rem}
.popexp ul li.curr{color:#73C887}
.popexp ul li.curr div{position:absolute;width:.25rem;height:.25rem;border-radius:.25rem;background:#73C887;border:.05rem solid #D1ECD9;left:.22rem}
.popexp ul li p{padding-top:.2rem}
.popexp ul li i{float:left;width:100%;height:1px;background:#ccc;margin:.2rem 0}
.popclose{position: fixed; bottom: 1rem; text-align: center; width: 100%; height: .5rem; z-index: 1000; display: none;}
.popclose img{width: auto; height: .8rem;}

..ord-list .bh p{
	
	padding:0.3rem 0.3rem;
}

.ord-list .info dl dd {
 
    width: 4.7rem;
  
}
</style>
</head>
<body>
<div class="outwrap">
		<!--top-->	
  	<!-- <div class="topbar clearfix topvh">
    <a href="/user/index" class="btn-back">
        <i class="ico-back"></i><span>返回</span>
    </a>
			<h2 class="title">订单</h2>
		</div> -->

    <div class="meinner-adr-add" style="margin-top: -64px;">
        <div class="outer ord-main">
         <div class="inner">
         <div id="thelist">
          <?php foreach($this->data['data'] as $v):?>
        <div class="ord-list">
      <div class="bh"><p>订单编号：<?=$v['order_sn']?></p>
      
      </div>
      <div class="info">
        <dl><dt>套餐：</dt><dd><?= $v['tao_info'];?></dd></dl>
        <dl><dt>状态：</dt><dd class="state"><span><?= $v['shipping_status'];?></span></dd></dl>
        <dl><dt>时间：</dt><dd><?=date("Y-m-d H:i:m",$v['ctime'])?></dd></dl>
        <dl><dt>收货人：</dt><dd><?=$v['tao_name']?></dd></dl>
        <dl><dt>电话：</dt><dd><?=$v['tao_mobile']?></dd></dl>
        <dl><dt>地址：</dt><dd><?=$this->data['region'][$v['tao_province_id']]?><?=$this->data['region'][$v['tao_city_id']]?><?= !empty($v['tao_county_id'])?$this->data['region'][$v['tao_county_id']]:'';?><?=$v['tao_address']?></dd></dl> 
        <dl><dt>快递名称：</dt><dd><?=$v['express_name'] ;?></dd></dl>
        <dl><dt>快递单号：</dt><dd><?=$v['express_id'] ;?></dd></dl>
      </div>
      <div class="splist">
        <div class="btns">
        <?php if($v['shipping_status'] !=2 && $v['receive_time'] <= 0){?>
           <a href="javascript:void(0)" class="color" onClick="receive_order(<?=$v['order_id']?>);">确认收货</a>
        <?php }?>
         </div>
      </div>
    </div>
      <?php endforeach;?>
      </div>
      </div>
      </div>
     
  </div>
  

</div>

<script type="text/javascript">
//确认收货
function receive_order(order_id) {
    swal({
        title: "确定收到货了吗？",
        type: "warning",
        timer: 30000,
        showCancelButton: true,
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnConfirm: false,
        closeOnCancel: true
    }, function(isConfirm) {
        if (isConfirm) {
            $.ajax({
                type: "POST",
                url: "/user/ajax",
                data: {
                    "act": "receive_order",
                    "order_id": order_id,
                    "mr": Math.random()
                },
                dataType: "json",
                success: function(data) {
                    if (data.code == 200) {
                        swal(data.msg, false, "success");
                        setTimeout(function() {
                        	window.location.reload();
                        }, 2100);
                    } else {
                        swal(data.msg+'['+data.code+']', false, "error");
                    }
                }
            });
        }
    });
}
</script>
</body>
</html>